package week9.Q4;

import week9.Q2.Chinese;

public class Car  extends Vehicle implements  IPower{
    private String carNumber;


    public Car(String brand,String color,String carNumber){
        super(brand,color);
        this.carNumber=carNumber;

    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    @Override
    public void run() {

        System.out.println("一辆"+getBrand());

    }

    public void power(){
        System.out.println("加油");
    }
}
